
sda = 3
scl = 4
function init_OLED(sda,scl)
     sla = 0x3c
     i2c.setup(0, sda, scl, i2c.SLOW)
     disp=u8g.ssd1306_128x64_i2c(sla)
     disp:setFont(u8g.font_6x10)
     disp:setFontRefHeightExtendedText()
     disp:setDefaultForegroundColor()
     disp:setFontPosTop()
end
function print_OLED()
    disp:firstPage()
    repeat
     disp:drawFrame(2, 2,126,62)
     disp:drawStr(30, 5, "Hello Mcu!!")
     disp:drawStr(30, 20,"CSDNzwh")
     disp:drawStr(80, 40, str1)
     disp:drawFrame(0, 16,128,45)
     until disp:nextPage() == false
end
str1="by:zwh"
init_OLED(sda,scl)
str1 = "hello world"
str2 = "nimabi"
str3 = "woyaoshuijiao"

 print_OLED()

